package com.hx.zhg.web.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试服务是否能够处理请求
 */

@Api(tags = "PING/PONG接口")
@RestController
public class PingPongController {

    private static final Logger log = LoggerFactory.getLogger(PingPongController.class);

    @ApiOperation(value = "测试服务是否可访问ping", notes = "测试服务是否可访问notes")
    @RequestMapping(value = "/ping", method = RequestMethod.GET)
    public String ping() {
        log.info("start method ping");
        return "pong";
    }

    @ApiOperation(value = "测试服务是否可访问pong", notes = "测试服务是否可访问notes")
    @RequestMapping(value = "/pong", method = RequestMethod.GET)
    public String pong() {
        log.info("start method pong");
        return "ping";
    }


}
